package com.xxx.feignclient;


import com.xxx.common.Result;
import com.xxx.dto.IndentDto;
import com.xxx.pojo.ShoppingCart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("ORDER")
public interface OrderClient {

    @PostMapping("/shop/save")
    Result saveShop(@RequestBody List<ShoppingCart> cartList);

    @GetMapping("/shop/shopCart")
    Result getShop(@RequestParam("id") Long id);

    @PostMapping("/indent/save")
    Result saveIndent(@RequestBody IndentDto indentDto);

    @GetMapping("/indent/list")
    Result getOrderList(@RequestParam("id") Long id);
}
